%h1.page_title Sign up
%table
  - form_for @user, :method => :put do |form| 
    %tr
      %td.field_title Username: 
      %td.field
        = form.text_field :login
        *
      %td.error= error_message_on :user, :login
    %tr
      %td.field_title E-mail:
      %td.field
        = form.text_field :email
        *
      %td.error= error_message_on :user, :email
    %tr
      %td.field_title Password:
      %td.field
        = form.password_field :password
        *
      %td.error= error_message_on :user, :password
    %tr
      %td.field_title Confirm Password:
      %td.field
        = form.password_field :password_confirmation
        *
      %td.error= error_message_on :user, :password_confirmation
    - if logged_in? && current_user.is_admin?
      %tr
        %td.field_title Admin?:
        %td.field
          %select{:name => "user[is_admin]"}
            %option{:value => "0"} No
            %option{:value => "1"} Yes
        %td.error= error_message_on :user, :is_admin
      %tr
        %td.field_title Client?:
        %td.field
          %select{:name => "user[is_client]"}
            %option{:value => "0"} No
            %option{:value => "1"} Yes
        %td.error= error_message_on :user, :is_client
    %tr
      %td
      %td.field_title * required
    %tr
      %td
      %td.submit= submit_tag 'Create'